<ul id="question-list" style="margin-left:0px">

<% if @part.questions.size == 0 %>
  还没有题目
<% end %>
<% i = 0 %>
<% @part.questions.each do |q| %>

  <% i += 1 %>
<li id="item_<%=q.id%>" style="list-style-type:none">

      
  <table width="440" border="0" align="center" cellpadding="0" cellspacing="0" id="item_<%=q.id%>">
    <tr>
      <td width="60%">
        第<%= i %>题.&nbsp;&nbsp;
        <%= q.description %> &nbsp;&nbsp;&nbsp;&nbsp;
      </td>
      <td width="62">

      </td>
    </tr>
   
    <!--选项-->
    <% q.choices.each do |c| %>
    <tr>
      <td><label>
        <input type="radio" name="RadioGroup1" value="单选"/>
        <%= c.content %> 
          
        </label>
      </td>
      <td class="red"><%= c.value %>分</td>
    </tr>
    
    <% end %>
    <!--选项结束-->
    
    
    <tr><td height="18"></td></tr>
    
  </table>
</li>

<% end %> 

</ul>


<%= sortable_element 'question-list',  
    :url => { :action => "sort", :id => @test },
    :complete => visual_effect(:highlight, 'question-list')  
%>     
<script>
  function heighlight(el){
    new Effect.Highlight(el, {duration: 1.5})
  }
  
  if(null != "<%= @heighlight_id %>" && "" != "<%= @heighlight_id %>") {
    heighlight("item_<%= @heighlight_id %>");
  }
</script>

